<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Tetris: Board Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tetris
   
   </div>
   <div id="projectbrief">Um jogo do tipo tetris</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Board Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Board" -->
<p>Classe do tipo <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code>.  
 <a href="class_board.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="board_8h_source.html">board.h</a>&gt;</code></p>

<p><a href="class_board-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ee491d4fea680cf69b033374a9fdfcb"></a><!-- doxytag: member="Board::Board" ref="a9ee491d4fea680cf69b033374a9fdfcb" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a9ee491d4fea680cf69b033374a9fdfcb">Board</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construtor padrão classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af73f45730119a1fd8f6670f53f959e68"></a><!-- doxytag: member="Board::~Board" ref="af73f45730119a1fd8f6670f53f959e68" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#af73f45730119a1fd8f6670f53f959e68">~Board</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destrutor padrão classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a9c39cd47355ff518c21b94c0db920ecf">getScore</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter a pontuação total.  <a href="#a9c39cd47355ff518c21b94c0db920ecf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_level.html">Level</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a716c5f0db30e1ff230a9f92f50a659fe">getLevel</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter um objeto do tipo <code><a class="el" href="class_level.html" title="Classe do tipo Level.">Level</a></code> que contém as informações do level atual.  <a href="#a716c5f0db30e1ff230a9f92f50a659fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsScene *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ac63395b1aebcae7fdd744b18de8c1f20">getNextPieceScene</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter um ponteiro para um <code>QGraphicsScene</code> que conterá o desenho de <em>m_NextPiece</em>.  <a href="#ac63395b1aebcae7fdd744b18de8c1f20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ab647ccf386b7a788ec8a1e19616abf88">isGameOver</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter a situação do jogo.  <a href="#ab647ccf386b7a788ec8a1e19616abf88"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba8377fc1b3159d212431997509d3886"></a><!-- doxytag: member="Board::setImageBackground" ref="aba8377fc1b3159d212431997509d3886" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#aba8377fc1b3159d212431997509d3886">setImageBackground</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para desenhar aleatóriamente uma imagem de fundo. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a7fadc00fcfb1835e6e2189d80c2c53ed">setImage</a> (QImage img)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para escolher uma imagem de fundo.  <a href="#a7fadc00fcfb1835e6e2189d80c2c53ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9dfe80a7b225a4490a66072f8788a2bd"></a><!-- doxytag: member="Board::redesenheBoard" ref="a9dfe80a7b225a4490a66072f8788a2bd" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a9dfe80a7b225a4490a66072f8788a2bd">redesenheBoard</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que através do mapeamento utilizado em <em>m_Map</em> redesenha as peças em suas novas posições com suas devidas cores. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4465574b0d2fde0c43454b8b5afe0f72"></a><!-- doxytag: member="Board::tryMoveRight" ref="a4465574b0d2fde0c43454b8b5afe0f72" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a4465574b0d2fde0c43454b8b5afe0f72">tryMoveRight</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que verifica se é possível realizar a movimentação de <em>m_PecaAtual</em> à direita. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c283e4a28873887dfb3658dc503365d"></a><!-- doxytag: member="Board::tryMoveLeft" ref="a0c283e4a28873887dfb3658dc503365d" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a0c283e4a28873887dfb3658dc503365d">tryMoveLeft</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que verifica se é possível realizar a movimentação de <em>m_PecaAtual</em> à esquerda. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0a3e8366d5d4427e7341f4cafba337c"></a><!-- doxytag: member="Board::tryMoveDown" ref="ac0a3e8366d5d4427e7341f4cafba337c" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ac0a3e8366d5d4427e7341f4cafba337c">tryMoveDown</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que verifica se é possível realizar a movimentação de <em>m_PecaAtual</em> a baixo. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0544736a36f2a354956bf5c685eec356"></a><!-- doxytag: member="Board::tryRotation" ref="a0544736a36f2a354956bf5c685eec356" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a0544736a36f2a354956bf5c685eec356">tryRotation</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que verifica se é possível realizar a rotação de <em>m_PecaAtual</em>. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e30c56bcfe528b785848cca7684c096"></a><!-- doxytag: member="Board::randPiece" ref="a1e30c56bcfe528b785848cca7684c096" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a1e30c56bcfe528b785848cca7684c096">randPiece</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que sorteia uma nova peça para ser adicionada ao tabuleiro. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8329196e902f8fe845af9c4c5d4d1fc"></a><!-- doxytag: member="Board::clearData" ref="aa8329196e902f8fe845af9c4c5d4d1fc" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#aa8329196e902f8fe845af9c4c5d4d1fc">clearData</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> que limpa o tabuleiro e reinicia a pontuação e o level. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Classe do tipo <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code>. </p>
<p>Esta classe herda as propriedades da classe <code>QGraphicsScene</code>. Ela gerencia os eventos que acontecem na tela principal do jogo. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Ghybson </dd>
<dd>
Luís </dd>
<dd>
Willian </dd></dl>
<dl class="version"><dt><b>Version:</b></dt><dd>0.1 </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>2011 </dd></dl>
<dl class="copyright"><dt><b>Copyright:</b></dt><dd>GNU Public License. </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd><p class="startdd">Não está aparecendo documentando no doxygen os membros privados. </p>
<p class="enddd">Testar os indices de acesso <em>Board::m_Map</em> para impedir violação de acesso a memória. </p>
</dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a716c5f0db30e1ff230a9f92f50a659fe"></a><!-- doxytag: member="Board::getLevel" ref="a716c5f0db30e1ff230a9f92f50a659fe" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_level.html">Level</a> Board::getLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter um objeto do tipo <code><a class="el" href="class_level.html" title="Classe do tipo Level.">Level</a></code> que contém as informações do level atual. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Retorna o membro do tipo <code><a class="el" href="class_level.html" title="Classe do tipo Level.">Level</a></code> <em>m_Level</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="ac63395b1aebcae7fdd744b18de8c1f20"></a><!-- doxytag: member="Board::getNextPieceScene" ref="ac63395b1aebcae7fdd744b18de8c1f20" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QGraphicsScene * Board::getNextPieceScene </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter um ponteiro para um <code>QGraphicsScene</code> que conterá o desenho de <em>m_NextPiece</em>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Retorna <em>m_Score</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="a9c39cd47355ff518c21b94c0db920ecf"></a><!-- doxytag: member="Board::getScore" ref="a9c39cd47355ff518c21b94c0db920ecf" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Board::getScore </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter a pontuação total. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Retorna <em>m_Score</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="ab647ccf386b7a788ec8a1e19616abf88"></a><!-- doxytag: member="Board::isGameOver" ref="ab647ccf386b7a788ec8a1e19616abf88" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Board::isGameOver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para obter a situação do jogo. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Retorna <em>m_GameOver</em>. </dd></dl>

</div>
</div>
<a class="anchor" id="a7fadc00fcfb1835e6e2189d80c2c53ed"></a><!-- doxytag: member="Board::setImage" ref="a7fadc00fcfb1835e6e2189d80c2c53ed" args="(QImage img)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Board::setImage </td>
          <td>(</td>
          <td class="paramtype">QImage&#160;</td>
          <td class="paramname"><em>img</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Função membro pública da classe <code><a class="el" href="class_board.html" title="Classe do tipo Board.">Board</a></code> para escolher uma imagem de fundo. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">img</td><td>objeto do tipo <code>QImage</code> que contém a imagem de plano de fundo. </td></tr>
  </table>
  </dd>
</dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Não funciona se não for passado o endereço completo das imagens. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="board_8h_source.html">board.h</a></li>
<li>board.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 29 2011 12:33:35 for Tetris by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
